package com.kongjs.application.convert;

import com.kongjs.application.model.dto.*;
import com.kongjs.application.model.entity.Tenants;
import com.kongjs.application.model.vo.QueryTenantParamVO;
import com.kongjs.application.model.vo.QueryTenantVO;
import com.kongjs.application.model.vo.SaveTenantVO;
import com.kongjs.application.model.vo.UpdateTenantVO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

import java.util.List;

@Mapper(componentModel = "spring",unmappedSourcePolicy = ReportingPolicy.IGNORE,unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TenantsConverter {
    SaveTenantDTO toDto(SaveTenantVO vo);

    UpdateTenantDTO toDto(UpdateTenantVO vo);

    QueryTenantVO toVo(QueryTenantDTO dto);

    List<QueryTenantVO> toVos(List<QueryTenantDTO> dtos);

    QueryTenantParamDTO toDto(QueryTenantParamVO paramVO);

    Tenants toEntity(SaveTenantDTO dto);

    Tenants toEntity(UpdateTenantDTO dto);

    QueryTenantDTO toDto(Tenants tenants);

    List<QueryTenantDTO> toDtos(List<Tenants> tenants);

    TenantCacheDTO toCache(Tenants tenants);
}
